// custom-tab-bar/index.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    selected:0,
    color: "#919191",
    selectedColor: "#E7166B",
    list: [{
      "id":0,
      "pagePath": "/pages/index1/index1",
      "text": "首页",
      "iconPath": "/static/tabbar/images/index_.png",
      "selectedIconPath": "/static/tabbar/images/index_active.png"
    }, {
      "id":1,
      "pagePath": "/pages/KTV1/KTV1",
      "text": "KTV",
      "iconPath": "/static/tabbar/images/KTV_.png",
      "selectedIconPath": "/static/tabbar/images/KTV_active.png"
    }, {
      "id":2,
      "pagePath": "/pages/I_sing1/I_sing1",
      "iconPath": "/static/tabbar/images/Middle_icon_.png",
      "selectedIconPath": "/static/tabbar/images/Middle_icon_.png"
    }, {
      "id":3,
      "pagePath": "/pages/message1/message1",
      "text": "消息",
      "iconPath": "/static/tabbar/images/message_.png",
      "selectedIconPath": "/static/tabbar/images/message_active.png"

    }, {
      "id":4,
      "pagePath": "/pages/my1/my1",
      "text": "我的",
      "iconPath": "/static/tabbar/images/my_.png",
      "selectedIconPath": "/static/tabbar/images/my_active.png"
    }]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e) {
      
      const data = e.currentTarget.dataset
      const url = data.path
      console.log(url)
      wx.switchTab({url})
      // this.setData({
      //   selected: data.index
      // })
    }
  }
})